import { defineConfig } from 'vitepress'
import { containerPreview, componentPreview } from '@vitepress-demo-preview/plugin'
// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "nf-ui",
  base: '/nf-ui',
  description: "大数据开发文档",
  themeConfig: {
    nav: [
      {text: "guide", link: "/guide/start"},
      {text: "component", link: "/components/card/index"},
      {text: "utils", link: "/utils/index"},
    ],
    sidebar: {
      guide: [
        {
          text: '基础',
          items: [
            {text: '快速上手', link: '/guide/start'}
          ]
        }
      ],
      component: [
        {
          text: "基础组件",
          items: [
            {text: "Card 卡片", link: "/components/card/index"},
            {text: "Charts 图表", link: "/components/charts/index"},
            {text: "Highlight 高亮", link: "/components/highlight/index"},
            {text: "Flag 国旗", link: "/components/flag/index"},
            {text: "Form 表单", link: "/components/form/index"},
            {text: "Table 表格", link: "/components/table/index"},
            {text: "TagPopover 更多标签", link: "/components/tag-popover/index"},
            {text: "VirtualList 虚拟滚动", link: "/components/virtual-list/index"},
          ],
        },
        {
          text: "图表",
          items: [
            {text: "柱状图", link: "/components/charts/bar/index"},
            {text: "词云", link: "/components/charts/word-cloud/index"},
            {text: "日历", link: "/components/charts/calendar/index"},
            {text: "折线图", link: "/components/charts/line/index"},
            {text: "环状图", link: "/components/charts/pie/index"},
          ],
        },
      ],
      utils: [
        {
          text: "工具",
          items: [
            {text: "time", link: "/utils/time"},
            {text: "number", link: "/utils/number"},
            {text: "html", link: "/utils/html"},
            {text: "color", link: "/utils/color"},
          ],
        },
      ]
    },
  },

  markdown: {
    config(md) {
      md.use(containerPreview)
      md.use(componentPreview)
    }
  }
})
